cURL
curl --request GET \
--url https://app.masivo.ai/api/storefront/v1/campaigns/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.masivo.ai/api/storefront/v1/campaigns/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.masivo.ai/api/storefront/v1/campaigns/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.masivo.ai/api/storefront/v1/campaigns/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.masivo.ai/api/storefront/v1/campaigns/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.masivo.ai/api/storefront/v1/campaigns/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.masivo.ai/api/storefront/v1/campaigns/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"attributes": {},
"stores": [
"<string>"
],
"channels": [
"<string>"
],
"products": [
"<string>"
],
"content": {
"Title": {
"name": "Title",
"type": "input",
"value": "Value of the title"
},
"BannerImage": {
"alt": "Alternative description for the image",
"href": "Href link for the image",
"name": "BannerImage",
"type": "image",
"value": "https://URL_TO_IMAGE"
},
"Description": {
"name": "Name of the description",
"type": "input",
"value": "Value of the description"
}
},
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Campaigns
Get campaign
Get a specific campaign
GET
/
campaigns
/
{id}
cURL
curl --request GET \
--url https://app.masivo.ai/api/storefront/v1/campaigns/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.masivo.ai/api/storefront/v1/campaigns/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.masivo.ai/api/storefront/v1/campaigns/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.masivo.ai/api/storefront/v1/campaigns/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.masivo.ai/api/storefront/v1/campaigns/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.masivo.ai/api/storefront/v1/campaigns/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.masivo.ai/api/storefront/v1/campaigns/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"attributes": {},
"stores": [
"<string>"
],
"channels": [
"<string>"
],
"products": [
"<string>"
],
"content": {
"Title": {
"name": "Title",
"type": "input",
"value": "Value of the title"
},
"BannerImage": {
"alt": "Alternative description for the image",
"href": "Href link for the image",
"name": "BannerImage",
"type": "image",
"value": "https://URL_TO_IMAGE"
},
"Description": {
"name": "Name of the description",
"type": "input",
"value": "Value of the description"
}
},
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The campaign unique identifier
Query Parameters
Filter coupon availability for a specific customer. Only applies to COUPONS campaigns.
Whether to include additional data inside attributes Only applies to COUPONS campaigns. Adds attributes.codes_summary with used, total, left, codes, and codes_usage.
Available options:
CODES_SUMMARY Response
Ok
Campaign response. account_id, order, and created_at are not returned.
Show child attributes
Show child attributes
⌘I